package Filter.impl;

import Filter.service.Criteria;
import Filter.entity.Person;
import lombok.AllArgsConstructor;

import java.util.List;

/**
 * @author chengjunjie
 * @date 2025-09-10
 */

@AllArgsConstructor
public class AndCriteria implements Criteria {

    Criteria one;
    Criteria two;

    @Override
    public List<Person> filter(List<Person> personList) {
        List<Person> personList1 = one.filter(personList);
        return two.filter(personList1);
    }
}
